<template>
<section class="Order">
    <el-tabs type="border-card" value="出售明细">
        <el-tab-pane label="出售明细" name="出售明细">
            <el-table :data="Entrustdata.data" style="width: 100%">
                <el-table-column prop="symbol" label="订单号" width="200"></el-table-column>
                <el-table-column prop="symbol" label="数量"></el-table-column>
                <el-table-column prop="symbol" label="单价"></el-table-column>
                <el-table-column prop="symbol" label="成交总额"></el-table-column>
                <el-table-column prop="symbol" label="订单号" width="200"></el-table-column>
                <el-table-column prop="status" label="状态">
                    <template slot-scope="scope">
                        <span v-if="scope.row.status == 0">
                            {{$t('tranorder[7]')}}
                        </span>
                        <span v-else-if="scope.row.status == 1">
                            {{$t('tranorder[8]')}}
                        </span>
                        <span v-else-if="scope.row.status == 2">
                            {{$t('tranorder[9]')}}
                        </span>
                        <span v-else-if="scope.row.status == 3">
                            {{$t('tranorder[10]')}}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="symbol" label="时间" width="200"></el-table-column>
                <el-table-column prop="address" label="操作" width="200">
                    <template slot-scope="scope">
                        <el-button type="text" size="small" @click="handlecancellations(scope.row)">详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-tab-pane>
        <el-tab-pane label="购买明细" name="购买明细">

        </el-tab-pane>
    </el-tabs>
</section>
</template>

<script>
export default {
    name: 'fabiorder',
    data() {
        return {
            tableData: "",
            dialogVisible: false,
            Entrustdata: {
                data: [],
            },
            Historydata: {
                data: [],
            },
        }
    },
    methods: {
        handlecancellations(row) {
            this.$confirm(this.$t('msg[3]'), this.$t('header.tishi[1]'), {
                type: 'warning'
            }).then(() => {
                let _data = {
                    orders_id: row.orders_id,
                };
                bcancellations(_data).then(res => {
                    if (res.data.status_code == 200) {
                        this.$message({
                            message: this.$t('msg[4]'),
                            type: 'success'
                        });
                        this.$emit('func', this.form)
                    } else {
                        this.$message.error(res.data.message);
                    }
                }).catch(err => {

                });
            })
        }
    },
    created() {},
    computed: {
        pokerHistory() {
            return this.History
        },
        pokerEntrust() {
            return this.Entrust
        },
    },
    watch: {
        pokerHistory(newValue, oldValue) {
            this.Historydata = newValue;
        },
        pokerEntrust(newValue, oldValue) {
            this.Entrustdata = newValue;
        },
    },
    components: {

    },
}
</script>
